Repository navigation
feat(platform-objects): the System Overview datasets carry synonyms and a description on their seven members - #34992
Conversation
…s and a description WIP: vocabulary and bundle rows; source hashes, pin and changeset follow. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
…ord description source digests Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
…set words Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
📓 Docs Drift Check20 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 3 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 669ddac4f5a113f6bcf218a005b46f36d2104a5b && git checkout 669ddac4f5a113f6bcf218a005b46f36d2104a5b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4443014630c094cde840f9dd0b0b45ade45b48d9 692c9c1b8c66cb99b6265edae19527169284652c && git checkout -B drift-repro 4443014630c094cde840f9dd0b0b45ade45b48d9 && git merge --no-ff 692c9c1b8c66cb99b6265edae19527169284652c
node scripts/docs-audit/affected-docs.mjs --json 4443014630c094cde840f9dd0b0b45ade45b48d9 |
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: ACCEPT This is the first L1 read of #34992 (card #34921) at the head above. The base is fb5c42d, and the head merges cleanly with current main. Must-fixNone. Should-fix
Notes
|
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Flake judgement · 2026-11-17T23:28ZCI run 44193314153 (ci.yml, attempt 1) on head Area o3-D re-runs the failed jobs of this run once. A second failure goes to the seat, not to another merge. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Landing · 2026-11-18T00:02Z
CI history on this head: Test Core (10/10) attempt 1 timed out fetching history (measured nothing), judged in 6964080957 and re-run once; attempt 2 green. 82b53be's red was a lint.yml checkout timeout. Open findings: nits only (package_count's zh label 「安装」 not among its synonyms; a zh-CN ['用户'] pin would hold the dimension-plus-measure reading), kept in the record under the merge standard. State: ready + auto-merge armed by area o3-D (lease Dev-effort: high · Rounds: 1 |
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
Fixes #34921
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz
Clause-②: no
Metadata-protocol: none
维护者速读
user_count。system.datasets.ts和语言包这一个 PR。packages/platform-objects/src/apps/dashboards/system.datasets.ts(七组同义词,看措辞准不准、有没有两个指标抢同一个词);②packages/rest/src/system-overview-dataset-vocabulary.test.ts(真实数据集走真实list_datasets的钉子);③packages/platform-objects/src/apps/translations/zh-CN.ts的datasets段。pnpm --filter @objectstack/rest exec vitest run src/system-overview-dataset-vocabulary.test.ts(需先构建 platform-objects),预期 8 个用例全绿。What changes
The five System Overview datasets (
packages/platform-objects/src/apps/dashboards/system.datasets.ts) gain ADR-0149 D1 vocabulary on all seven members:sys_user_metricsuser_countsys_organization_metricsorg_countsys_session_metricssession_countsys_package_installation_metricspackage_countsys_audit_log_metricsactionsys_audit_log_metricsuser_idsys_audit_log_metricsevent_countEach member also gets a one-sentence
description. That text is display copy, so it has a bundle entry atdatasets.NAME.{measures,dimensions}.MEMBER.descriptionin all eleven Setup bundle locales (en mirrors the source verbatim; zh-CN, zh-Hant, ja-JP, ko, es-ES, fr, pt-BR, de, ru and ar are hand-translated, as the existingdatasets.*.labelrows are). Each translated locale records the new paths' source digests in its hand-maintainedLOCALE.source-hashes.ts, written the same way the label rows were (collectSourceHashes(en); the existing label digests reproduce byte-for-byte). No*.generated.tsfile changes, and no generator output moves.How the matcher treats these words.
matchDatasetTerms(service-analytics) compares a term with a member's name, label and synonyms by EQUALITY afternormalizeDatasetTerm. It never matches a substring or a single word inside a phrase. So a multi-word term such as "how many users" resolves only where a member writes that exact phrase as one synonym. I chose to write the administrator's phrasing (how many users,有多少用户) as synonyms, plus the term forms a model lifts from a question (user count,用户数). A longer question with no exact hit, such as "how many users do we have", still gets only nearcandidates(containment, two code points or more), which means a clarifying question. That behaviour is unchanged.Collisions. Within one dataset, the schema's vocabulary refinement judges collisions (full
DatasetSchema.safeParseis green for all five). Across the five datasets, no synonym is a word of another measure in any locale, and a new test pins that. The one cross-member equality is 「用户」: it is auser_countsynonym and also the existing zh-CN label of theuser_iddimension. In zh-CN the two labels already met before this PR. A dimension match picks no number, so the word still answers withuser_count. In other locales the synonym adds the only match.The other language's bare label is listed on purpose (
usersbeside 「用户」). The label a caller is matched against is the one served in the caller's locale, so under zh-CN the English labelUsersis not a match target.No spec, schema, protocol or vocabulary-rule change. The rule's module note ("It answers to no synonym unless its source writes one") stays true; the source now writes them.
Tests
packages/rest/src/system-overview-dataset-vocabulary.test.ts(new) puts the pin where these datasets meet the dataset tools without new wiring:@objectstack/restalready depends on both@objectstack/platform-objectsand@objectstack/service-analytics. It feeds the REAL datasets, localized by the REAL Setup bundle throughtranslateDataset, to the REALlist_datasetsof anAnalyticsServicePlugin-booted service. The objects behind the datasets are declaration doubles. Underenandzh-CN:terms: ['用户数']matches exactlysys_user_metrics.measures.user_count, onsynonym, and has nocandidates;terms: ['how many users']matches the same member the same way;terms: ['营收', 'revenue']matches nothing and has nocandidates;user_count's description from the bundle.system-overview-dataset-translations.test.tsgains a top-leveldescribein the existing harness file:Test runs (head 82b53be)
Ablation: drop user_count's synonyms, the pin goes red
The ablation ran through
scripts/ablation-replace.mjs, which deleted theuser_countsynonymsarray. Thenpnpm --filter @objectstack/platform-objects build, thennode scripts/ablation-dist-preflight.mjs @objectstack/platform-objects "total users" --absent(exit 0: the marker is gone fromdist/).The 4 that stayed green are the listing, the two controls and the description case, which is what you would expect.
Restore:
ablation-replace: ok restored: blob == HEAD (b3d478488ce5) and git diff HEAD is empty. After a rebuild the preflight found the marker present in 4 built files with a clean tree, and the suite went back toTests 8 passed (8).Acceptance notes
scripts/i18n-coverage-baseline.jsonholdspackages/platform-objects/scripts/i18n-extract.config.ts: 0before and after, andnode scripts/check-i18n-coverage.mjsreportsOK (14 config(s), 423 baselined untranslated string(s), none new). The extract config declares nodatasets, so the ratchet's population does not include these rows in either direction. The new strings are held instead by the translation test above (every locale translated, en verbatim).normalizeDatasetTermdoes not fold Traditional to Simplified, so a zh-Hant administrator typing 「使用者數」 matches only the zh-Hant label 「使用者」, and only in that locale. This is noted here, not filed.sys_package_installationis cloud-only. Where the object is absent, its dataset is left out oflist_datasets, and the synonyms are harmless there.Verification
Derived gate families (63) and reconciliation
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 63 families from merge base fb5c42d, tree 82b53be. All 63 ran locally.Three exited 3 (PREREQUISITE NOT MET) on the first pass and were re-run once the prerequisite held, each exit 0:
pnpm check:i18n, after the CLI and extract-closure build:OK (10 package(s) — all bundles in sync, no undeclared authoring keys);pnpm check:dual-build-cjs-loads, after a full workspace build:124 published require entry point(s) across 72 package(s) load;node scripts/check-plugin-teardown-shape.mjs --self-test, after fetching its pinned fixture commit into the shallow clone:48 cases pass.The dist-reading gates were re-run after the full build, all exit 0:
check:dts-closure,check:published-files,check:lean-entry-closure,check:sourcemap-no-sources-content,check-dts-emitted --self-test.overlap-checkbefore each push:VERDICT clean exit 0against origin/main and #34799, which shares the locale bundles and merges cleanly.The rest of the
@objectstack/restsuite was not re-run locally: this PR adds one test file there and changes no rest source. CI'sTest Coreruns it.